<template>
    <div>
        跳转中.....
    </div>
</template>

<script>
export default {
    data:function(){
        return{

        }
    },
    methods:{
        init:function(){
            this.axios({
            url:"http://127.0.0.1:8000/sinalogin/",
            method:'GET',
        }).then((res)=>{
            if(res.data.code==200){
                localStorage.setItem('username',res.data.uid);
                console.log(res.data.uid);
                this.$router.push("/")
            }else{
                console.log('信息出错');
                alert(res.data.message);
            }
        })
        }
    },
    mounted:function(){
        this.init()
    }
}
</script>
